/**
 * createUser:JAVA_TOM
 * FileName: indexContrllor
 * Author:   14562
 * Date:     2019/1/2 14:52
 * Description: 首页控制器
 */
package com.javatom.zwl.index.contrllor;

import com.javatom.zwl.index.config.indexConfig;
import com.javatom.zwl.index.inferter.userFeign;
import com.javatom.zwl.shop_bean.userInfoBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;

import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope
public class indexContrllor {

    @Autowired
    private indexConfig indexConfig;

    @Autowired
    private userFeign userFeign;

    @GetMapping("port")
    public indexConfig getPropertiresBean() {
        System.out.println("1");
        return indexConfig;
    }

    @GetMapping("user")
    public userInfoBean getUser() {
        return userFeign.getUser();
    }


}
